Skip to content

feat(docker): add compact mode support for all tools#155

Merged
Dave-London merged 2 commits intomainfrom
compact/docker
Feb 12, 2026
Merged

feat(docker): add compact mode support for all tools#155
Dave-London merged 2 commits intomainfrom
compact/docker

Conversation

@Dave-London
Copy link
Copy Markdown
Owner

Summary

  • Adds automatic compact mode to all 9 Docker tools (ps, images, build, logs, pull, run, exec, compose-up, compose-down)
  • When structured JSON output exceeds raw CLI token count, automatically returns a reduced schema
  • Agents can opt out with compact: false to always get the full schema

Changes

  • 9 compact interfaces, mappers, and formatters in formatters.ts
  • All 9 tool files updated to use compactDualOutput
  • 28 new unit tests for compact mappers/formatters

Closes #124 (docker portion)

Test plan

  • pnpm build compiles all packages
  • pnpm --filter @paretools/docker test — 290 tests pass
  • CI passes

🤖 Generated with Claude Code

Dave-London and others added 2 commits February 12, 2026 12:30
The compact ps mapper was dropping the `stopped` field, but the output
schema (DockerPsSchema) requires it as a non-optional number. When
compact mode kicked in, MCP output validation failed with
"expected number, received undefined" for `stopped`.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@Dave-London Dave-London merged commit 8873de0 into main Feb 12, 2026
9 checks passed
@Dave-London Dave-London deleted the compact/docker branch February 12, 2026 10:55
Dave-London added a commit that referenced this pull request Feb 16, 2026
- Improve env compact mode to include queried variables (#150)
- Capture fmt stderr parse errors in structured output (#151)
- Parse generate per-directive status with -v/-x (#152)
- Add per-package success/failure to get output (#153)
- Capture golangci-lint fix/replacement data (#154)
- Add error field to list package entries (#155)
- Detect mod-tidy changes vs already-tidy state (#156)
- Add analyzer name to vet diagnostics (#157)

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Dave-London added a commit that referenced this pull request Feb 16, 2026
- Improve env compact mode to include queried variables (#150)
- Capture fmt stderr parse errors in structured output (#151)
- Parse generate per-directive status with -v/-x (#152)
- Add per-package success/failure to get output (#153)
- Capture golangci-lint fix/replacement data (#154)
- Add error field to list package entries (#155)
- Detect mod-tidy changes vs already-tidy state (#156)
- Add analyzer name to vet diagnostics (#157)

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Dave-London added a commit that referenced this pull request Feb 16, 2026
- Improve env compact mode to include queried variables (#150)
- Capture fmt stderr parse errors in structured output (#151)
- Parse generate per-directive status with -v/-x (#152)
- Add per-package success/failure to get output (#153)
- Capture golangci-lint fix/replacement data (#154)
- Add error field to list package entries (#155)
- Detect mod-tidy changes vs already-tidy state (#156)
- Add analyzer name to vet diagnostics (#157)

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add compact mode support to remaining servers (docker, cargo, go, python, build, test)

1 participant